<script setup lang="ts">
import { ref, reactive,onMounted } from "vue"
//引入pinia模块
import useInfoStore from "../store/modules/info"
import useTodo from "../store/modules/todo"

//获取小仓库对象
// let infoStore=useInfoStore()
// console.log(infoStore)

let todo=useTodo()
function goToChangeArr(){
  todo.changeArr(5)
}
</script>

<template>
  <div>
    <!-- 我是组件2：{{ infoStore.count }} -->
    我是组件2：{{ todo.arr }}
  </div>
  <button @click="goToChangeArr">添加数据到todo.arr</button>
  <div>{{ todo.total }}</div>
</template>

<style scoped></style>
